<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>透明度</title>
    <style>
        .opacity {
            width: 500px;
            height: 500px;
            margin: 0 auto;
            background-color: teal;
        }
        .ul1 {
            background-color: thistle;
            /* opacity: 0; */
            

            
        }
        .ul1:hover {
            
            animation-name: move;
            animation-timing-function:linear;
            animation-duration:0.5s;
            animation-fill-mode: forwards;
            animation-iteration-count: 1;
            animation-direction: alternate;
        }
        li {
            width: 100%;
            height: 100px;
        }
        @keyframes move1 {
            from {
                height: 0;
            }
            to {
                height: 77.75px;
            }
        }
    </style>
</head>
<body>
    <div class="opacity">
        <ul class="ul1">
            <li class="li1">hhh</li>
            <li>xxx</li>
        </ul>
    </div>
</body>
</html>